import request from '@/utils/request'

// 查询头条新闻列表
export function listToutiaoNews(query) {
  return request({
    url: '/information/toutiaoNews/list',
    method: 'get',
    params: query
  })
}

// 查询头条新闻详细
export function getToutiaoNews(id) {
  return request({
    url: '/information/toutiaoNews/' + id,
    method: 'get'
  })
}

// 新增头条新闻
export function addToutiaoNews(data) {
  return request({
    url: '/information/toutiaoNews',
    method: 'post',
    data: data
  })
}

// 修改头条新闻
export function updateToutiaoNews(data) {
  return request({
    url: '/information/toutiaoNews',
    method: 'put',
    data: data
  })
}

// 删除头条新闻
export function delToutiaoNews(id) {
  return request({
    url: '/information/toutiaoNews/' + id,
    method: 'delete'
  })
}

// 导出头条新闻
export function exportToutiaoNews(query) {
  return request({
    url: '/information/toutiaoNews/export',
    method: 'get',
    params: query
  })
}

// 更新头条信息
export function updateNews(data) {
  return request({
    //url: '/information/toutiaoNews/refresh',
    url: '/information/toutiaoNews/wayjd',
    method: 'put',
    data: data
  })
}

